import React from 'react';
// @ts-ignore
import { VirtualList as Table } from 'abc-ui';
const dataSource: object[] = [];
// const dataSource = [
//   {
//     key: '1',
//     name: '胡彦斌1',
//     age: 32,
//     address: '西湖区湖底公园1号',
//   },
// ];
for (let i = 0; i < 5000; i += 1) {
  dataSource.push({
    key: i,
    name: '胡彦斌1' + i,
    age: i,
    address: '西湖区湖底公园1号' + i,
  });
}

const columns = [
  {
    title: '姓名',
    dataIndex: 'name',
    key: 'name',
    width: 200,
  },
  {
    title: '年龄',
    dataIndex: 'age',
    key: 'age',
    width: 200,
  },
  {
    title: '住址',
    dataIndex: 'address',
    key: 'address',
    // width: 500,
  },
];
export default () => {
  return (
    <div>
      <Table dataSource={dataSource} columns={columns} scroll={{ y: 240 }} />
    </div>
  );
};
